<template>
  <div class="team-picker-item">
    <div class="team-desc" @click.stop.prevent="clickItem({team_id: teamId, team_name: teamName})">
      <span class="team-name grey">{{ teamName }}</span>
    </div>
  </div>
</template>

<script>
  export default{
    props: {
      teamName: {
        require: true
      },
      teamId: {
        require: true
      },
      isBack: {
        type: Object
      }
    },
    data () {
      return {
        showConfirm: false
      }
    },
    methods: {
      clickItem (team) {
        console.debug(team)
        this.$emit('on-click', team)
      }
    },

    components: {
    }
  }
</script>

<style lang="less">
  @import '../less/index.less';

  .team-picker-item {
    background-color: white;
    margin: 10px auto;
    width: 90%;

    .bg-white{
      padding-bottom: 15px;
      padding-top: 15px;
      border-bottom: 1px solid #e0dcdc;
    }

    .user-ico {
      font-size: 12px;
      width: 100%;
      height: 100%;
      line-height: 40px;
      color: white;
      border-radius: 100%;
      text-align: center;
      padding: 2px;
      width: 40px;
      height: 40px;
      overflow: hidden;
      white-space: nowrap;
      display: inline-block;

      img {
        width: 100%;
      }
    }

    .team-desc {
       display: block;
       border: 1px solid #39ADFF;
       padding: 8px 10px;
       font-weight: bolder;
       border-radius: 4px;

       &>*{
         vertical-align: middle;
       }
    }

    .img-wrapper {

      width: 3em;
      height: 3em;
      display: inline-block;

      img {
        border-radius: 3em;
        border: 1px solid #eee;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

    }

    a,a:hover,a:visited,a:focus{
      color:#323333;
    }

    .social-name{
      display: inline-block;
      margin-left: 10px;
    }

    .team-name{
      margin-left: 1px;
      font-size: 16px;
      color: #39ADFF;
      width: 10rem;
      display: inline-block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .pull-right {
      float: right;
      font-size: 12px;
      color: grey;
      margin: 0.8rem;
    }

  }
</style>
